{{ define "term/edit.html" }}
{{ template "term/header.html" . }}
{{ if .term.SN }}
<h2>编辑终端</h2>
{{ else }}
<h2>新增终端</h2>
{{ end }}
<form action="/term/submit" method="post">
  <div class="mb-3">
    <label for="sim" class="form-label">SIM卡(手机)号</label>
    {{ if .term.SN }}
    <input type="text" class="form-control" id="sim" name="sim" placeholder="请输入SIM" value="{{ .term.SIM }}" required readonly autocomplete="off">
    {{ else }}
    <input type="text" class="form-control" id="sim" name="sim" placeholder="请输入SIM" required autocomplete="off">
    {{ end }}
  </div>
  <button type="submit" class="btn btn-primary">提交</button>
</form>
{{ template "term/footer.html" . }}
{{ end }}